package com.fs.service.impl;

import com.fs.mapper.SalesDetailsMapper;
import com.fs.pojo.SalesDetails;
import com.fs.service.SalesDetailsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author python_boy
 * @fileName SalesDetailsServiceImpl
 * @date 2024/10/21 10:48
 * @description
 **/
@Service
public class SalesDetailsServiceImpl implements SalesDetailsService {
    @Resource
    private SalesDetailsMapper salesDetailsMapper;

    /**
     * 添加销售明细
     * @param salesDetails 销售明细对象
     * @return 影响行数
     */
    @Override
    public int addSalesDetails(SalesDetails salesDetails) {
        return salesDetailsMapper.insert(salesDetails);
    }

    @Override
    public List<SalesDetails> queryAll() {
        return salesDetailsMapper.selectList(null);
    }
}
